<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>叶玫瑰数</title>
</head>
<body>
    <!-- 求出1000-9999之间的 4 叶玫瑰数 -->
</body>
<script>
    (function () {
        for (let i = 1000; i <= 9999; i++) {
            let thousand = parseInt(i / 1000);//千位数
            let hundred = parseInt(i / 100) % 10;//百位数
            let tens = parseInt(i / 10) % 10;//十位数
            let digit = parseInt(i % 10);//个位数
            if (i == Math.pow(thousand, 4) + Math.pow(hundred, 4) + Math.pow(tens, 4) + Math.pow(digit, 4)) {
                console.log(i);
            }
        }







    })();
</script>
</html>